/*
 * Copyright Aduna (http://www.aduna-software.com/) (c) 2008.
 *
 * Licensed under the Aduna BSD-style license.
 */
package edu.tju.rdfbase.store;

/**
 * A connection to an RDF Store object. A StoreConnection is active from the
 * moment it is created until it is closed. Care should be taken to properly
 * close StoreConnections as they might block concurrent queries and/or updates
 * on the Store while active, depending on the Store-implementation that is being
 * used.
 * 
 * @author James Leigh
 */
public interface NotifyingStoreConnection extends StoreConnection {

	/**
	 * Registers a StoreConnection listener with this StoreConnection. The listener
	 * should be notified of any statements that are added or removed as part of
	 * this StoreConnection.
	 * 
	 * @param listener
	 *        A StoreConnectionListener.
	 */
	public void addConnectionListener(StoreConnectionListener listener);

	/**
	 * Deregisters a StoreConnection listener with this StoreConnection.
	 * 
	 * @param listener
	 *        A StoreConnectionListener.
	 */
	public void removeConnectionListener(StoreConnectionListener listener);

}
